<template>
	<view class="uni-product" @click="bindClick">
		<view class="image-view">
			<image class="uni-product-image" :src="product.image"></image>
		</view>
		<view class="uni-product-title">{{product.title}}</view>
		<view class="uni-product-price">
			<view class="price-box">
				<view class="score-price">
					<image class="" mode="widthFix" src="../../static/images/currency1.png"></image>
					<view class="price">{{product.score1Price}}</view>
				</view>
				<view class="score-price">
					<image class="" mode="widthFix" src="../../static/images/currency3.png"></image>
					<view class="price">{{product.score3Price}}</view>
				</view>
			</view>
			<text class="uni-product-tip" v-show="product.tip != null">{{product.tip}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			product: {
				type: Object,
				default: function(e) {
					return {};
				}
			}
		},
		methods: {
			bindClick() {
				this.$emit('click');
			},

			
		}
	};
</script>

<style>
	.uni-product {
	  width: 50%;
	  margin: 0;
	}
	.uni-product .image-view {
	  width: 100%;
	}
	.uni-product .image-view image {
	  max-width: 100%;
	}
	.uni-product .score-price {
	  flex-direction: row;
	}
	.uni-product .score-price image {
	  width: 20px;
	  height: 20px;
	  display: flex;
	  margin-right: 5px;
	}
	.uni-product .score-price .price {
	  font-weight: bold;
	  font-size: 16px;
	  justify-content: center;
	  line-height: 100%;
	}
</style>
